<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/static/common/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>${nm.title}</title>
    <%@include file="../public/webApp.jsp" %>
</head>
<body>
<c:if test="${not empty nm.coverPic}">
    <img src="${fileServerUrl}${nm.coverPic}" width="100%">
</c:if>
<c:if test="${empty nm.coverPic}">
    <img src="${ctx}/static/images/message/default.png" width="100%">
</c:if>
<blockquote class="title">
    ${nm.title}
</blockquote>
<div style="padding: 0px 25px">
    <p class="time">${nm.sendTime}</p>
    <hr>
    <div class="js_font">
        ${nm.contentHtml}
    </div>
</div>
<script>
    $(function () {
        $('.js_font img').each(function () {
            var maxWidth = 300; // 图片最大宽度
            $(this).css("maxWidth", maxWidth);
            $(this).parent().css("text-align", 'center');
        });
        largeFont();
    });

    function largeFont() {
        var currentFontSize = $(".js_font p,.js_font span").css("font-size");
        //取得当前字体大小，parseFloat()转为float类型去除后缀
        var currentFontSizeNumber = parseFloat(currentFontSize);
        //新定义的字体大小
        var newFontSize = currentFontSizeNumber * 1.2;
        //重写样式表
        $(".js_font p,.js_font span").css("font-size", newFontSize);
    }
</script>
</body>
</html>